package com.yjd.comm.asynmsg.service;

import java.util.List;
import java.util.Map;

import com.yjd.comm.asynmsg.enums.TaskMsgClientIdEnum;
import com.yjd.comm.asynmsg.enums.TaskMsgTypeEnum;
import com.yjd.comm.asynmsg.model.TaskMsgModel;
import com.yjd.comm.base.service.IBaseService;

/**
 * <b>description</b>：任务消息业务接口<br>
 * <b>time</b>：2015-01-26 16:41:39 <br>
 * <b>author</b>： ready likun_557@163.com
 */
public interface ITaskMsgService extends IBaseService {

	/**
	 * 新增一条任务消息
	 * 
	 * @param ref_id
	 * @param msgTypeEnum
	 * @return
	 * @throws Exception
	 */
	public TaskMsgModel insert(String ref_id, TaskMsgTypeEnum msgTypeEnum,TaskMsgClientIdEnum client_id,String client_order_id)
			throws Exception;

	/**
	 * 新增一条任务消息
	 * 
	 * @param ref_id
	 * @param msgTypeEnum
	 * @param extend_data_map
	 *            扩展信息，将转换成json保存至数据库
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("rawtypes")
	public TaskMsgModel insert(String ref_id, TaskMsgTypeEnum msgTypeEnum,
			Map extend_data_map,TaskMsgClientIdEnum client_id,String client_order_id) throws Exception;

	/**
	 * 批量添加
	* @param models
	* @throws Exception
	 */
	public void inserts(List<TaskMsgModel> models) throws Exception;
	/**
	 * 更新
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int updateTaskMsg(TaskMsgModel model) throws Exception;

	/**
	 * 将任务消息移到日志表中
	 * 
	 * @param task_msg_ids
	 * @throws Exception
	 */
	public void moveTaskMsgToTaskMsgLog(List<Long> task_msg_ids)
			throws Exception;

}
